Check ADS for zone identifier before trying to load a dll plugin.#3646
Open
EosBandi wants to merge 1 commit into
Open
Check ADS for zone identifier before trying to load a dll plugin.#3646EosBandi wants to merge 1 commit into
EosBandi wants to merge 1 commit into
Conversation
Collaborator
|
only issue is this is not other OS friendly |
Collaborator
|
does File.Exists work? |
Collaborator
Author
|
Unfortunately in .net4.7 alternative data streams are not recognized, so it needs system calls. To check if we are on Windows isn't the |
Collaborator
|
Can we do the inverse? If we know it's windows do the pinvokes, else skip. Ie positive detection. I'm just thinking ahead as mono is getting limited. |
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detect and report blocked plugin DLLs on Windows
On Windows 10 and 11, DLLs downloaded from the internet are marked as unsafe via a Zone Identifier (stored as an NTFS Alternate Data Stream). When a plugin DLL is blocked in this way, Windows prevents it from loading.
Previously, blocked plugin DLLs failed silently in MP, producing no error message. This led to significant user confusion and multiple support issues, especially when custom plugins were distributed to end users.
This change adds a check for the presence of a Zone Identifier = Internet on plugin DLLs. If a DLL is blocked, MP now displays a clear error message informing the user of the issue and how to resolve it.
For security reasons, the application does not attempt to remove the Zone Identifier automatically. The DLL must be manually unblocked by the user via the file’s Properties dialog.